package com.example.consume;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ConfirmConsumer {

    @RabbitListener(queues = "confirm.queue")
    public void receive(Message message) {
        log.info("接收到来自队列confirm.queue的消息:{}", new String(message.getBody()));
    }

}
